1. Field of the Invention
The present invention relates to an encoding apparatus and method for encoding image data, and to a storage medium on which this method is stored.
2. Related Background Art
Recently, there has been an increase in the number of applications for compressing static images as image data and for externally transmitting the compressed image data, or for storing it in a memory. For these purposes, it is preferable that lossless compression and encoding be used, especially when the data is for static images used for medical purposes, so that no deterioration of image quality occurs.
Accordingly, various efficient lossless compression and encoding methods have been proposed. For example, a compression and encoding method has been proposed for outputting a difference between a pixel to be encoded and a predicted value generated by using peripheral pixels, and for performing Golomb-Rice coding for this difference.
Furthermore, the Golomb-Rice coding can be applied as a part of a lossy encoding method for a multi-valued static image, so that satisfactory coding efficiency can be maintained and there is no deterioration of image quality.
However, how efficient these proposed compression and encoding methods will be is questionable, and a demand exists for a more efficient compression and encoding method.
To resolve the conventional problem, it is one objective of the present invention to perform Golomb-Rice coding efficiently.
To achieve the above objective, an encoding apparatus according to the present invention has the features specified in the following entries. The encoding apparatus comprises:
an input unit (corresponding to an input unit 100 or 1101 in the preferred embodiments) for inputting image data for each predetermined unit;
a generation unit (corresponding to a Golomb-Rice encoding circuit 104 or 1106) for performing Golomb-Rice coding for the image data for each predetermined unit (corresponding to one pixel or one sub-block), and for generating K types of Golomb-Rice coded data by separately employing K types of k parameters;
a holding unit (corresponding to coded data selector 104xe2x80x2 or 1106xe2x80x2) for holding the K types of Golomb-Rice coded data obtained by the generation unit; and
a determination unit (corresponding to prediction converting circuit 102 or 1105) for, based on the image data, determining one of the k parameters for each predetermined unit,
wherein the holding unit employs the selected k parameter to select and output one of the held K types of Golomb-Rice coded data.
The other objectives and features of the present invention will become apparent during the course of the explanation for the following embodiments, given while referring to the accompanying drawings.